package com.ruoyi.redtea.dualprevent.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 分析单元（对象）的风险点
 * @TableName train_analyse_unit_risk_point
 */
@TableName(value ="train_analyse_unit_risk_point")
@Data
public class TrainAnalyseUnitRiskPoint implements Serializable {
    /**
     * 分析单元分析点id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 所属分析单元id
     */
    private Integer analyseUnitId;

    /**
     * 风险点名称
     */
    private String riskPointName;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Date updateTime;

    /**
     * 
     */
    @TableLogic
    private Integer isdel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TrainAnalyseUnitRiskPoint other = (TrainAnalyseUnitRiskPoint) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAnalyseUnitId() == null ? other.getAnalyseUnitId() == null : this.getAnalyseUnitId().equals(other.getAnalyseUnitId()))
            && (this.getRiskPointName() == null ? other.getRiskPointName() == null : this.getRiskPointName().equals(other.getRiskPointName()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsdel() == null ? other.getIsdel() == null : this.getIsdel().equals(other.getIsdel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAnalyseUnitId() == null) ? 0 : getAnalyseUnitId().hashCode());
        result = prime * result + ((getRiskPointName() == null) ? 0 : getRiskPointName().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsdel() == null) ? 0 : getIsdel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", analyseUnitId=").append(analyseUnitId);
        sb.append(", riskPointName=").append(riskPointName);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isdel=").append(isdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}